import {
  cancelAttentionApi
} from '@/apis/fans';
import {
  ElMessage
} from 'element-plus';
import {
  useUserStore
} from "@/store/user";

export default function useFans(props) {
  const userStore = useUserStore();

  const cancelAttention = async () => {
    const res = await cancelAttentionApi(userStore.userInfo.id, props.list.userId)

    // await props.getMessageAttention()

    ElMessage.success({
      type: 'info',
      message: res.data
    })
  }

  return {
    cancelAttention
  }

}